package com.qzimp.fujiancuo.utils;

import com.qzimp.fujiancuo.entity.dto.CaptchaInfo;

import java.util.HashMap;
import java.util.Map;

// 简单模拟验证码存储库，实际应用中可替换为更可靠的缓存或数据库操作类
public class CaptchaRepository {
    private static Map<String, CaptchaInfo> captchaMap = new HashMap<>();

    public static void saveCaptcha(CaptchaInfo captchaInfo) {
        captchaMap.put(captchaInfo.getCaptchaId(), captchaInfo);
    }

    public static CaptchaInfo getCaptcha(String captchaId) {
        return captchaMap.get(captchaId);
    }
}